package com.zntech.app.instantcmd.component.demo

import android.app.Service
import android.content.Intent
import android.os.IBinder
import android.os.RemoteException
import android.util.Log
import com.zntech.app.common.IInstantCmdComponent


class BluetoothTouchService : Service() {
    override fun onBind(p0: Intent?): IBinder? {
        return ComponentBinder()
    }

    // click envent callback here
    internal class ComponentBinder : IInstantCmdComponent.Stub() {
        @Throws(RemoteException::class)
        override fun touch(event: Int, x: Float, y: Float) {
            Log.e("peterhuang for test", "event($event),{ $x,$y}")

            //蓝牙点击实现
            // ....
            // ...
            // ..
        }

        @Throws(RemoteException::class)
        override fun doKeycode(keycode: Int) {
            Log.e("peterhuang for test", "keycode:$keycode")
        }
    }
}